function buildPie() {
  return {
    tooltip: {
      trigger: 'item',
      formatter: '{a} <br/>{b} : {c} ({d}%)'
    },
    legend: {
      orient: 'vertical',
      right: 'right',
      data: ['直接访问', '邮件营销', '联盟广告']
    },
    series: [
      {
        name: '访问来源',
        type: 'pie',
        radius: '80%',
        center: ['40%', '50%'],
        data: [
          { value: 335, name: '直接访问' },
          { value: 310, name: '邮件营销' },
          { value: 234, name: '联盟广告' }
        ],
        label: {
          show: false
        }
      }
    ]
  }
}

export default buildPie
